From: Domas Mituzas Date: Fri, 11 Jun 2004 15:46:42 +0000 (+0000) Subject: PG: old->"old" X-Git-Tag: 1.5.0alpha1~2913 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=13c5b9217bbb280f9dfd164a4790b47f7ed0f3db;p=lhc%2Fweb%2Fwiklou.git PG: old->"old" --- diff --git a/includes/RawPage.php b/includes/RawPage.php index 3d99586128..4116f00566 100644 --- a/includes/RawPage.php +++ b/includes/RawPage.php @@ -60,7 +60,7 @@ class RawPage { } function getrawtext () { - global $wgInputEncoding, $wgLang; + global $wgInputEncoding, $wgLang, $wgIsPg; if( !$this->mTitle ) return ''; $t = wfStrencode( $this->mTitle->getDBKey() ); $ns = $this->mTitle->getNamespace(); @@ -73,7 +73,9 @@ class RawPage { } # else get it from the DB if(!empty($this->mOldId)) { - $sql = "SELECT old_text as text,old_timestamp as timestamp,old_user as user,old_flags as flags FROM old " . + $oldtable=$wgIsPg?'"old"':'old'; + $sql = "SELECT old_text AS text,old_timestamp AS timestamp,". + "old_user AS user,old_flags AS flags FROM $oldtable " . "WHERE old_id={$this->mOldId}"; } else { $sql = "SELECT cur_id as id,cur_timestamp as timestamp,cur_user as user,cur_user_text as user_text," .